package com.example.myapplication.dao;

import com.example.myapplication.bean.CircleEntity;
import com.example.myapplication.bean.Goods;
import com.example.myapplication.bean.Guanzhu;
import com.example.myapplication.bean.Luntan;
import com.example.myapplication.bean.Merchant;
import com.example.myapplication.bean.OrderBean;
import com.example.myapplication.bean.Pinglun;
import com.example.myapplication.bean.Select;
import com.example.myapplication.bean.Shoucang;
import com.example.myapplication.bean.User;

import org.greenrobot.greendao.AbstractDao;
import org.greenrobot.greendao.AbstractDaoSession;
import org.greenrobot.greendao.database.Database;
import org.greenrobot.greendao.identityscope.IdentityScopeType;
import org.greenrobot.greendao.internal.DaoConfig;

import java.util.Map;

// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.

/**
 * {@inheritDoc}
 * 
 * @see org.greenrobot.greendao.AbstractDaoSession
 */
public class DaoSession extends AbstractDaoSession {

    private final DaoConfig circleEntityDaoConfig;
    private final DaoConfig goodsDaoConfig;
    private final DaoConfig guanzhuDaoConfig;
    private final DaoConfig luntanDaoConfig;
    private final DaoConfig merchantDaoConfig;
    private final DaoConfig orderBeanDaoConfig;
    private final DaoConfig pinglunDaoConfig;
    private final DaoConfig selectDaoConfig;
    private final DaoConfig shoucangDaoConfig;
    private final DaoConfig userDaoConfig;

    private final CircleEntityDao circleEntityDao;
    private final GoodsDao goodsDao;
    private final GuanzhuDao guanzhuDao;
    private final LuntanDao luntanDao;
    private final MerchantDao merchantDao;
    private final OrderBeanDao orderBeanDao;
    private final PinglunDao pinglunDao;
    private final SelectDao selectDao;
    private final ShoucangDao shoucangDao;
    private final UserDao userDao;

    public DaoSession(Database db, IdentityScopeType type, Map<Class<? extends AbstractDao<?, ?>>, DaoConfig>
            daoConfigMap) {
        super(db);

        circleEntityDaoConfig = daoConfigMap.get(CircleEntityDao.class).clone();
        circleEntityDaoConfig.initIdentityScope(type);

        goodsDaoConfig = daoConfigMap.get(GoodsDao.class).clone();
        goodsDaoConfig.initIdentityScope(type);

        guanzhuDaoConfig = daoConfigMap.get(GuanzhuDao.class).clone();
        guanzhuDaoConfig.initIdentityScope(type);

        luntanDaoConfig = daoConfigMap.get(LuntanDao.class).clone();
        luntanDaoConfig.initIdentityScope(type);

        merchantDaoConfig = daoConfigMap.get(MerchantDao.class).clone();
        merchantDaoConfig.initIdentityScope(type);

        orderBeanDaoConfig = daoConfigMap.get(OrderBeanDao.class).clone();
        orderBeanDaoConfig.initIdentityScope(type);

        pinglunDaoConfig = daoConfigMap.get(PinglunDao.class).clone();
        pinglunDaoConfig.initIdentityScope(type);

        selectDaoConfig = daoConfigMap.get(SelectDao.class).clone();
        selectDaoConfig.initIdentityScope(type);

        shoucangDaoConfig = daoConfigMap.get(ShoucangDao.class).clone();
        shoucangDaoConfig.initIdentityScope(type);

        userDaoConfig = daoConfigMap.get(UserDao.class).clone();
        userDaoConfig.initIdentityScope(type);

        circleEntityDao = new CircleEntityDao(circleEntityDaoConfig, this);
        goodsDao = new GoodsDao(goodsDaoConfig, this);
        guanzhuDao = new GuanzhuDao(guanzhuDaoConfig, this);
        luntanDao = new LuntanDao(luntanDaoConfig, this);
        merchantDao = new MerchantDao(merchantDaoConfig, this);
        orderBeanDao = new OrderBeanDao(orderBeanDaoConfig, this);
        pinglunDao = new PinglunDao(pinglunDaoConfig, this);
        selectDao = new SelectDao(selectDaoConfig, this);
        shoucangDao = new ShoucangDao(shoucangDaoConfig, this);
        userDao = new UserDao(userDaoConfig, this);

        registerDao(CircleEntity.class, circleEntityDao);
        registerDao(Goods.class, goodsDao);
        registerDao(Guanzhu.class, guanzhuDao);
        registerDao(Luntan.class, luntanDao);
        registerDao(Merchant.class, merchantDao);
        registerDao(OrderBean.class, orderBeanDao);
        registerDao(Pinglun.class, pinglunDao);
        registerDao(Select.class, selectDao);
        registerDao(Shoucang.class, shoucangDao);
        registerDao(User.class, userDao);
    }
    
    public void clear() {
        circleEntityDaoConfig.clearIdentityScope();
        goodsDaoConfig.clearIdentityScope();
        guanzhuDaoConfig.clearIdentityScope();
        luntanDaoConfig.clearIdentityScope();
        merchantDaoConfig.clearIdentityScope();
        orderBeanDaoConfig.clearIdentityScope();
        pinglunDaoConfig.clearIdentityScope();
        selectDaoConfig.clearIdentityScope();
        shoucangDaoConfig.clearIdentityScope();
        userDaoConfig.clearIdentityScope();
    }

    public CircleEntityDao getCircleEntityDao() {
        return circleEntityDao;
    }

    public GoodsDao getGoodsDao() {
        return goodsDao;
    }

    public GuanzhuDao getGuanzhuDao() {
        return guanzhuDao;
    }

    public LuntanDao getLuntanDao() {
        return luntanDao;
    }

    public MerchantDao getMerchantDao() {
        return merchantDao;
    }

    public OrderBeanDao getOrderBeanDao() {
        return orderBeanDao;
    }

    public PinglunDao getPinglunDao() {
        return pinglunDao;
    }

    public SelectDao getSelectDao() {
        return selectDao;
    }

    public ShoucangDao getShoucangDao() {
        return shoucangDao;
    }

    public UserDao getUserDao() {
        return userDao;
    }

}
